//
//  System_AreaHandler.swift
//  mall-ios
//
//  Created by Meak Tsui on 2018/11/28.
//  Copyright © 2018 Meak Tsui. All rights reserved.
//

import Foundation
import MTHybrid

extension Api {
    static let Area = Api("area")
}

class System_AreaHandler: MTEventHandler {
    var ns: Ns {
        return .System
    }
    
    var action: Api {
        return .Area
    }
    
    func handler(_ msg: MTHybridMsg) {
        let area = Locale.current.regionCode ?? "CN"
        msg.callbackClosure?(area)
    }
    
    
}
